package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcArticleComment;
import com.visizen.wisdomclass.server.model.WcArticleCommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcArticleCommentMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcArticleCommentSqlProvider.class, method="countByExample")
    int countByExample(WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcArticleCommentSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_article_comment",
        "where comment_id = #{comment_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long comment_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_article_comment (comment_id, article_id, ",
        "user_id, equip_id, ",
        "comment_time, is_anonymous, ",
        "target_user_id, content)",
        "values (#{comment_id,jdbcType=BIGINT}, #{article_id,jdbcType=BIGINT}, ",
        "#{user_id,jdbcType=BIGINT}, #{equip_id,jdbcType=BIGINT}, ",
        "#{comment_time,jdbcType=TIMESTAMP}, #{is_anonymous,jdbcType=INTEGER}, ",
        "#{target_user_id,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR})"
    })
    int insert(WcArticleComment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcArticleCommentSqlProvider.class, method="insertSelective")
    int insertSelective(WcArticleComment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcArticleCommentSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="comment_id", property="comment_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="article_id", property="article_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="comment_time", property="comment_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER),
        @Result(column="target_user_id", property="target_user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<WcArticleComment> selectByExampleWithBLOBs(WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcArticleCommentSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="comment_id", property="comment_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="article_id", property="article_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="comment_time", property="comment_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER),
        @Result(column="target_user_id", property="target_user_id", jdbcType=JdbcType.BIGINT)
    })
    List<WcArticleComment> selectByExample(WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "comment_id, article_id, user_id, equip_id, comment_time, is_anonymous, target_user_id, ",
        "content",
        "from wc_article_comment",
        "where comment_id = #{comment_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="comment_id", property="comment_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="article_id", property="article_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="comment_time", property="comment_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER),
        @Result(column="target_user_id", property="target_user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    WcArticleComment selectByPrimaryKey(Long comment_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcArticleCommentSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcArticleComment record, @Param("example") WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcArticleCommentSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") WcArticleComment record, @Param("example") WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcArticleCommentSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcArticleComment record, @Param("example") WcArticleCommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcArticleCommentSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcArticleComment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @Update({
        "update wc_article_comment",
        "set article_id = #{article_id,jdbcType=BIGINT},",
          "user_id = #{user_id,jdbcType=BIGINT},",
          "equip_id = #{equip_id,jdbcType=BIGINT},",
          "comment_time = #{comment_time,jdbcType=TIMESTAMP},",
          "is_anonymous = #{is_anonymous,jdbcType=INTEGER},",
          "target_user_id = #{target_user_id,jdbcType=BIGINT},",
          "content = #{content,jdbcType=LONGVARCHAR}",
        "where comment_id = #{comment_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKeyWithBLOBs(WcArticleComment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_article_comment
     *
     * @mbggenerated
     */
    @Update({
        "update wc_article_comment",
        "set article_id = #{article_id,jdbcType=BIGINT},",
          "user_id = #{user_id,jdbcType=BIGINT},",
          "equip_id = #{equip_id,jdbcType=BIGINT},",
          "comment_time = #{comment_time,jdbcType=TIMESTAMP},",
          "is_anonymous = #{is_anonymous,jdbcType=INTEGER},",
          "target_user_id = #{target_user_id,jdbcType=BIGINT}",
        "where comment_id = #{comment_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcArticleComment record);
}